Scriptname THGLQuestScript extends Quest  

GlobalVariable Property pTHGLCount  Auto  

GlobalVariable Property pTHGLTotal  Auto  

Quest Property pTHGLQuest  Auto  

Armor Property pThGlove  Auto  

Function GlovesCounted()

	float CurrentCount = Game.GetPlayer().GetItemCount(pThGlove)

	pTHGLCount.Value = CurrentCount
	UpdateCurrentInstanceGlobal(pTHGLCount)
	if CurrentCount == 5
		pTHGLQuest.SetObjectiveCompleted(10,1)
		pTHGLQuest.SetObjectiveDisplayed(20,true,true)
	elseif CurrentCount < 5
		pTHGLQuest.SetObjectiveCompleted(10,0)
		pTHGLQuest.SetObjectiveDisplayed(20,0)
		pTHGLQuest.SetObjectiveDisplayed(10,true,true)	
	endif

endFunction